package com.hiyee.annotation;

import com.hiyee.validate.CheckUrlValidate;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 校验合法url注解
 *
 * @author WangBin
 * @date 2021-11-09
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = CheckUrlValidate.class)
public @interface CheckUrl {
    String message() default "非法的url地址";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}
